package kr.hkit.powerjava.chapter24.work2.dao;

import java.util.ArrayList;
import java.util.Comparator;

import kr.hkit.powerjava.chapter24.work.vo.Student;
import kr.hkit.powerjava.chapter24.work2.vo.Department;

public class DepartmentDao implements InterfaceDao<Department> {
	
	private ArrayList<Department> lists;
	private final String filePath= "departmentList.dat";
	@Override
	public void insertItem(Department item) {
		if (!lists.contains(item)) {
			lists.add(item);
		}	
	}
	@Override
	public void deleteItem(Department item) {
		lists.remove(item);
		
	}
	@Override
	public void updateItem(Department item) {
		lists.set(lists.indexOf(item), item);
		
	}
	@Override
	public Department searchItem(Department item) {
		Student searchValue=null;
		if(lists.contains(item))
			searchValue=lists.get(lists.indexOf(item));
		return searchValue;
	}
	@Override
	public void prnItemList(Comparator<Department> comp) {
		// TODO Auto-generated method stub
		
	}
	@Override
	public void loadFile() {
		// TODO Auto-generated method stub
		
	}
	@Override
	public void saveFile() {
		// TODO Auto-generated method stub
		
	}
	

}
